home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
geos-archive
/
GEOS-D64
/
GeoThek Programme (19xx)(-)(de)[gt105a].d64
/
convert.ml
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
1KB
|
48 lines
5 NA$="APP-INFO"
10 IFPEEK(828)<>162THENLOAD"XFER.ML",8,1
15 PRINT"[147]REMOVING LOAD ADDRESS..."
20 OPEN2,8,2,"PRG.OBJ":GET#2,SA$,SB$
30 OPEN3,8,3,"PRG.LIT,P,W"
40 SYS828:CLOSE2:CLOSE3
45 PRINT"SCRATCHING OLD OBJECT CODE..."
50 OPEN15,8,15,"S0:PRG.OBJ":OPEN2,8,2,"#":S=1
55 REM CHANGE BYTE 34 & 35 IN 18,01 TO POINT TO 1ST SECTOR IN PRG.LIT
58 PRINT"SEARCHING FOR FILES...
60 [152]15,"U1:";2;0;18;S:[152]15,"B-P";2;0:[161]#2,A$,B$:[139]A$[178]""[167]NS[178]0:[137]70
65 NS[178][198](B$)
70 [129]I[178]5[164]224[169]32
80 [152]15,"B-P";2;I
90 N$[178]"":[129]J[178]1[164]8:[161]#2,A$:N$[178]N$[170]A$:[130]
95 [139]N$[178]NA$[167]IS[178]S:II[178]I[171]2:P1[178]1:[153]" "NA$" FOUND...":[152]15,"S0:"NA$
98 [139]N$[178]NA$[167][139]P2[167]200
100 [139]N$[178]"PRG.LITCLOSE"[167][152]15,"B-P";2;I[171]3:[161]#2,A$:[139]A$[179][177]""[167]140
110 [130]I:[139]NS[178]0[167]200
120 S[178]NS:[137]60
140 [153]" PRG.LIT FOUND...
145 P2=1:PRINT#15,"B-P";2;I-3:PRINT#2,CHR$(0);:GET#2,TT$,SS$
150 PRINT#15,"U2:";2;0;18;S
155 IFTT$=""THENTT$=CHR$(0)
160 IFSS$=""THENSS$=CHR$(0)
170 GOTO110
200 IFP1=0THENPRINT"[158]"NA$" NOT FOUND.":CLOSE2:CLOSE15:END
210 IFP2=0THENPRINT"[158]PRG.LIT NOT FOUND.":CLOSE2:CLOSE15:END
215 PRINT"ATTACHING PRG.LIT TO "NA$
220 PRINT#15,"U1:";2;0;18;IS:PRINT#15,"B-P";2;II-1:PRINT#2,CHR$(131);TT$;SS$;
225 PRINT#15,"U2:";2;0;18;IS
230 CLOSE2:CLOSE15:PRINT"CALCULATING START & END ADDRESSES"
240 IFSA$=""THENSA$=CHR$(0)
250 IFSB$=""THENSB$=CHR$(0)
260 SR=ASC(SB$)*256+ASC(SA$):ER=SR
270 OPEN2,8,2,"APP-INFO
280 [161]#2,A$:ER[178]ER[170]1:[139]ST[167]300
290 [137]280
300 [160]2:EB$[178][199]([181](ER[173]256)):EA$[178][199](ER[171][181](ER[173]256)[172]256)
310 [159]2,8,2,"#":[159]15,8,15
320 [152]15,"U1:";2;0;18;IS:[152]15,"B-P";2;II[170]18:[161]#2,TT$,SS$
330 [139]TT$[178]""[167]TT$[178][199](0)
340 [139]SS$[178]""[167]SS$[178][199](0)
350 [152]15,"U1:";2;0;[198](TT$);[198](SS$):[152]15,"B-P";2;71
360 [152]2,SA$;SB$;EA$;EB$;SA$;SB$
365 [152]15,"U2:";2;0;[198](TT$);[198](SS$)
370 [160]2:[160]15:[153]"DONE!"